package com.fastloan.mgt.application.contract.enums;

/**
 * 放款模式
 *
 * @author yanwe
 * createTime 2018-01-2018/1/7 14:03
 */
public enum  LoanModeEnum {

    R_ONG_YU("1","融钰模式"),
    KD("2","快贷模式");

    private String type;

    private String name;

    LoanModeEnum(String type, String name) {
        this.type = type;
        this.name = name;
    }

    public String getType() {
        return type;
    }

    public String getName() {
        return name;
    }

    public static LoanModeEnum getById(String type){
        switch (type){
            case "1":
                return R_ONG_YU;
            case "2":
                return KD;
            default:
                throw new IllegalArgumentException("未知的放款模式:"+type);
        }
    }
}
